<?php
class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        $uri = $this->_request->getPathInfo();
        $activeNav = $this->view->navigation()->findByHref($uri);
        if ($activeNav != null) {
            $activeNav->active = true;
            $activeNav->setClass("active");
        }
    }

    public function indexAction()
    {
    }

    public function backoneAction()
    {
        $viewNs=new Zend_Session_Namespace("viewNs");
        $viewStore=$viewNs->levelOneView;
        if($viewStore!=null){
        	$controllerName=$viewStore->getControllerName();
        	$actionName=$viewStore->getActionName();
        	$page=$viewStore->getCurPage();
        	$this->_redirect("/".$controllerName."/".$actionName."/page/".$page);
        	
        }else{
        	$this->_redirect("/index/index");
        }
    }

    public function backtwoAction()
    {
        $viewNs=new Zend_Session_Namespace("viewNs");
        $viewStore=$viewNs->levelTwoView;
        if($viewStore!=null){
        	$controllerName=$viewStore->getControllerName();
        	$actionName=$viewStore->getActionName();
        	$page=$viewStore->getCurPage();
        	$this->_redirect("/".$controllerName."/".$actionName."/page/".$page);
        	
        }else{
        	$this->_redirect("/index/index");
   	 	}
    }


}







